export const platform = {
    IOS: 'ios',
    ANDROID: 'android',
    PC: 'pc'
};

export const getPlatform = function() {
    return new Promise(function(resolve) {
        wx.getSystemInfo({
            success: function(res) {
                if (res.platform == 'devtools') {
                    resolve(platform.PC);
                } else if (res.platform == 'ios') {
                    resolve(platform.IOS);
                } else if (res.platform == 'android') {
                    resolve(platform.ANDROID);
                }
            }
        });
    });
};
